<div class="panel panel-default">
    <div class="panel-body">
        <form action="./index.php" method="get" class="form-horizontal  form" role="form" id="form1" enctype="multipart/form-data">
            <input type="hidden" name="c" value="site" />
            <input type="hidden" name="a" value="entry" />
            <input type="hidden" name="m" value="ewei_shop" />
            <input type="hidden" name="do" value="allorder" />
            <input type="hidden" name="p" value="{$_GPC['p']}" />
            <input type="hidden" name="status" value="{$status}" />
            <input type="hidden" name="agentid" value="{$_GPC['agentid']}" />
            <input type="hidden" name="refund" value="{$_GPC['refund']}" />
            <div class="form-group">
                <div class="col-sm-8 col-lg-9 col-xs-12">
                    <div class='input-group'>
                        <div class='input-group-addon'>订单类型</div>
                        <select name="ordertype" class="form-control" id="ordertype">
                            <option value="allorder_list"  {if $_GPC['p']=='allorder_list'}selected="selected" {/if}>全部待发货订单</option>
                            <option value="normal_list"      {if $_GPC['p']=='normal_list' || $_GPC['p']==''}      selected="selected" {/if}>普通订单</option>
                            <option value="smallshop_list"   {if $_GPC['p']=='smallshop_list'}   selected="selected" {/if}>小店开通支付订单</option>
                            <option value="fightgroups_list" {if $_GPC['p']=="fightgroups_list"}  selected="selected" {/if}>微拼团订单</option>
                            <option value="limittime_list"    {if $_GPC['p']=="limittime_list"} selected="selected" {/if}>限时抢购订单</option>
                            <option value="tuangou_list"      {if $_GPC['p']=="tuangou_list"} selected="selected" {/if}>超级团购订单</option>
                            <option value="lottery_list"      {if $_GPC['p']=="lottery_list"} selected="selected" {/if}>拼团抽奖订单</option>
                            <option value="creditshop_list"   {if $_GPC['p']=="creditshop_list"} selected="selected" {/if}>积分商城订单</option>
                            <option value="goldshop_list"     {if $_GPC['p']=="goldshop_list"} selected="selected" {/if}>金币商城订单</option>
                            <option value="realgoods_list"    {if $_GPC['p']=="realgoods_list"} selected="selected" {/if}>真实物品兑换订单</option>
                            <option value="experience_list"   {if $_GPC['p']=="experience_list"} selected="selected" {/if}>体验券支付订单</option>
                        </select>
                    </div>
                </div>
            </div>
            {if $_GPC['p']=='realgoods_list'}
            <div class="form-group">
                <div class="col-sm-8 col-lg-9 col-xs-12">
                    <div class='input-group'>
                        <div class='input-group-addon'>兑换物品</div>
                        <select class="form-control" name="exid">
                            <option value="" ></option>
                                {loop $exchanges $exchange}
                                        <option value="{$exchange['id']}" {if $_GPC['exid'] == $exchange['id']}selected{/if}>{$exchange['title']}</option>
                                {/loop}
                        </select>
                    </div>
                </div>
            </div> 
            {/if}
            {if $_GPC['p']=='' || $_GPC['p']=='normal_list'}
            <div class="form-group">
                <div class="col-sm-8 col-lg-9 col-xs-12">
                    <div class='input-group'>
                        <div class='input-group-addon'>店铺信息</div>
                        <input class="form-control" name="xiaoshop" type="text" value="{$_GPC['xiaoshop']}" placeholder="可搜索呢称/姓名/手机号">
                    </div>
                </div>
            </div> 
           {/if}
            {if $_GPC['p']=='' || $_GPC['p']=='normal_list' || $_GPC['p']=='smallshop_list' || $_GPC['p']=='lottery_list' || $_GPC['p']=='fightgroups_list' || $_GPC['p']=='limittime_list' || $_GPC['p']=='tuangou_list' || $_GPC['p']=='experience_list' || $_GPC['p']=='realgoods_list' || $_GPC['p']=='goldshop_list' || $_GPC['p']=='creditshop_list'}
            <div class="form-group">
                <div class="col-sm-8 col-lg-9 col-xs-12">
                    <div class='input-group'>
                        <div class='input-group-addon'>订单编号</div>
                        <input class="form-control" name="ordersn" type="text" value="{$_GPC['ordersn']}" placeholder="订单编号">
                    </div>
                </div>
            </div> 
           {/if}
           {if $_GPC['p']=='' || $_GPC['p']=='normal_list' || $_GPC['p']=='fightgroups_list' || $_GPC['p']=='limittime_list' || $_GPC['p']=='tuangou_list' || $_GPC['p']=='realgoods_list' || $_GPC['p']=='goldshop_list' || $_GPC['p']=='creditshop_list' || $_GPC['p']=='lottery_list'}
            <div class="form-group">
                <div class="col-sm-8 col-lg-9 col-xs-12">
                    <div class='input-group'>
                        <div class='input-group-addon'>快递单号</div>
                        <input class="form-control" name="expresssn" type="text" value="{$_GPC['expresssn']}" placeholder="快递单号">
                    </div>
                </div>
            </div>
           {/if}
           {if $_GPC['p']=='fightgroups_list' || $_GPC['p']=='limittime_list' || $_GPC['p']=='tuangou_list' || $_GPC['p']=='lottery_list'}
            <div class="form-group">
                <div class="col-sm-8 col-lg-9 col-xs-12">
                    <div class='input-group'>
                        <div class='input-group-addon'>微信单号</div>
                        <input class="form-control" name="transid" type="text" value="{$_GPC['transid']}" placeholder="微信订单号">
                    </div>
                </div>
            </div>
           {/if}
           {if $_GPC['p']=='' || $_GPC['p']=='normal_list' || $_GPC['p']=='smallshop_list' || $_GPC['p']=='experience_list' || $_GPC['p']=='realgoods_list' || $_GPC['p']=='goldshop_list' || $_GPC['p']=='creditshop_list'}
            <div class="form-group">
                <div class="col-sm-8 col-lg-9 col-xs-12">
                    <div class='input-group'>
                        <div class='input-group-addon'>用户信息</div>
                        <input class="form-control" name="member" type="text" value="{$_GPC['member']}" placeholder="用户手机号/姓名/昵称">
                    </div>
                </div>
            </div>
            {/if}
            {if $_GPC['p']=="realgoods_list"}
            <div class="form-group">
                <div class="col-sm-8 col-lg-9 col-xs-12">
                    <div class='input-group'>
                        <div class='input-group-addon'>收件人名</div>
                        <input class="form-control" name="receiver" type="text" value="{$_GPC['receiver']}" placeholder="收件人">
                    </div>
                </div>
            </div>
            {/if}
            {if $_GPC['p']=='fightgroups_list' || $_GPC['p']=='limittime_list' || $_GPC['p']=='tuangou_list' || $_GPC['p']=='lottery_list' || $_GPC['p']=='lottery_list'}
            <div class="form-group">
                <div class="col-sm-8 col-lg-9 col-xs-12">
                    <div class='input-group'>
                        <div class='input-group-addon'>买家信息</div>
                        <input class="form-control" name="member" type="text" value="{$_GPC['member']}" placeholder="用户手机号/姓名">
                    </div>
                </div>
            </div>
            {/if}
            {if $_GPC['p']=='' || $_GPC['p']=='normal_list' || $_GPC['p']=='smallshop_list' || $_GPC['p']=='fightgroups_list' || $_GPC['p']=='limittime_list' || $_GPC['p']=='tuangou_list' || $_GPC['p']=='experience_list' || $_GPC['p']=='goldshop_list' || $_GPC['p']=='creditshop_list' || $_GPC['p']=='lottery_list'}
            <div class="form-group">
                <div class="col-sm-8 col-lg-9 col-xs-12">
                    <div class='input-group'>
                        <div class='input-group-addon'>支付方式</div>
                        <select name="paytype" class="form-control">
                            <option value="" >不限</option>
                            {loop $paytype $key $type}
                            <option value="{$key}" {if $_GPC['paytype'] == "$key"} selected="selected" {/if}>{$type['name']}</option>
                            {/loop}
                        </select>
                    </div>
                </div>
            </div>
            {/if}
            {if $_GPC['p']=='smallshop_list'}
            <div class="form-group">
                <div class="col-sm-8 col-lg-9 col-xs-12">
                    <div class='input-group'>
                        <div class='input-group-addon'>店铺类型</div>
                        <select name="shoptype" class="form-control">
                            <option value=""></option>
                            <option value="1" {if $_GPC['shoptype']==1}selected="selected"{/if}>银冠店</option>
                            <option value="2" {if $_GPC['shoptype']==2}selected="selected"{/if}>金冠店</option>
                            <option value="3" {if $_GPC['shoptype']==3}selected="selected"{/if}>钻石店</option>
                        </select>
                    </div>
                </div>
            </div> 
            {/if}
            {if $_GPC['p']=='smallshop_list'}
            <div class="form-group">
                <div class="col-sm-8 col-lg-9 col-xs-12">
                    <div class='input-group'>
                        <div class='input-group-addon'>状&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;态</div>
                        <select name="status" class="form-control">
                            <option value=""></option>
                            <option value="1" {if $_GPC['status']==1}selected="selected"{/if}>未审核</option>
                            <option value="2" {if $_GPC['status']==2}selected="selected"{/if}>已审核</option>
                        </select>
                    </div>
                </div>
            </div> 
            {/if}
            {if $_GPC['p']=='realgoods_list'}
            <div class="form-group">
                <div class="col-sm-8 col-lg-9 col-xs-12">
                    <div class='input-group'>
                        <div class='input-group-addon'>状&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;态</div>
                        <select name="status" class="form-control">
                            <option value=""></option>
                            <option value="0" {if $_GPC['status']==="0"}selected="selected"{/if}>待发货</option>
                            <option value="1" {if $_GPC['status']==1}selected="selected"{/if}>已发货</option>
                            <option value="2" {if $_GPC['status']==2}selected="selected"{/if}>已收货</option>
                        </select>
                    </div>
                </div>
            </div> 
            {/if}
            {if $_GPC['p']=='goldshop_list'}
            <div class="form-group">
                <div class="col-sm-8 col-lg-9 col-xs-12">
                    <div class='input-group'>
                        <div class='input-group-addon'>状&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;态</div>
                        <select name="status" class="form-control">
                            <option value=""></option>
                            <option value="2" {if $_GPC['status']==2}selected="selected"{/if}>待发货</option>
                            <option value="3" {if $_GPC['status']==3}selected="selected"{/if}>已发货</option>
                            <option value="4" {if $_GPC['status']==4}selected="selected"{/if}>已收货</option>
                        </select>
                    </div>
                </div>
            </div> 
            {/if}
            {if $_GPC['p']=='creditshop_list'}
            <div class="form-group">
                <div class="col-sm-8 col-lg-9 col-xs-12">
                    <div class='input-group'>
                        <div class='input-group-addon'>状&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;态</div>
                        <select name="status" class="form-control">
                            <option value=""></option>
                            <option value="2" {if $_GPC['status']==2}selected="selected"{/if}>已兑换</option>
                            <option value="3" {if $_GPC['status']==2}selected="selected"{/if}>已兑奖</option>
                        </select>
                    </div>
                </div>
            </div> 
            {/if}
            <div class="form-group">
                <div class="col-sm-6">
                    <div class='input-group'>
                        <div class='input-group-addon'>
                            {if $_GPC['p']=='' || $_GPC['p']=='normal_list' || $_GPC['p']=='fightgroups_list' || $_GPC['p']=='limittime_list' || $_GPC['p']=='tuangou_list' || $_GPC['p']=='lottery_list'}
                            下单时间
                            {/if}
                            {if $_GPC['p']=='smallshop_list' || $_GPC['p']=='experience_list'}
                            付款时间
                            {/if}
                            {if $_GPC['p']=='realgoods_list' || $_GPC['p']=='goldshop_list' || $_GPC['p']=='creditshop_list'}兑换时间{/if}
                            <label class='radio-inline' style='margin-top:-7px;'>
                                <input type='radio' value='0' name='searchtime' {if $_GPC['searchtime']=='0'}checked{/if}>不搜索
                            </label>
                            <label class='radio-inline'  style='margin-top:-7px;'>
                                <input type='radio' value='1' name='searchtime' {if $_GPC['searchtime']=='1'}checked{/if}>搜索
                            </label>
                        </div>
                        {php echo tpl_form_field_daterange('time', array('starttime'=>date('Y-m-d H:i', $starttime),'endtime'=>date('Y-m-d H:i', $endtime)),true);}
                            <input type="hidden" name="token" value="{$_W['token']}" />
                            <button class="btn btn-default" style="margin-left:10px;"><i class="fa fa-search"></i> 搜索</button>
                            <button type="submit" name="export" value="1" class="btn btn-primary" style="margin-left:10px;">导出 Excel</button>
                    </div>
                </div>
            </div>
        </form>
            {if $_GPC['p']=='' || $_GPC['p']=='normal_list'}
            {if $_GPC['status']==1}
            <form action="" method="post" class="form-horizontal form" enctype="multipart/form-data" >
                
                    <div class="col-sm-7  col-xs-12">
                        
                    <input type="file"  style="float:left;margin-right:10px;" name="import_expro" id="inputfile" class="btn btn-primary"/>
                    
                    <input type="submit" name="submit_expro" value="批量发货" class="btn btn-primary col-lg-1"  />
                    
                    <input type="submit" name="submit_modal" value="导出模板" class="btn btn-primary col-lg-1" style="margin-left:10px;" />
                    
                    </div>
            </form>
            {/if}
            {/if}
            {if $_GPC['p']=='fightgroups_list' || $_GPC['p']=='limittime_list' || $_GPC['p']=='tuangou_list' || $_GPC['p']=='lottery_list'}
            {if $_GPC['status']==2}
            <form action="" method="post" class="form-horizontal form" enctype="multipart/form-data" >
                
                    <div class="col-sm-7  col-xs-12">
                        
                    <input type="file"  style="float:left;margin-right:10px;" name="import_expro" id="inputfile" class="btn btn-primary"/>
                    
                    <input type="submit" name="submit_expro" value="批量发货" class="btn btn-primary col-lg-1"  />
                    
                    <input type="submit" name="submit_modal" value="导出模板" class="btn btn-primary col-lg-1" style="margin-left:10px;" />
                    
                    </div>
            </form>
            {/if}
            {/if}
            {if $_GPC['p']=='realgoods_list' || $_GPC['p']=='goldshop_list' || $_GPC['p']=='creditshop_list'}
            <form action="" method="post" class="form-horizontal form" enctype="multipart/form-data" >
                
                    <div class="col-sm-7  col-xs-12">
                        
                    <input type="file"  style="float:left;margin-right:10px;" name="import_expro" id="inputfile" class="btn btn-primary"/>
                    
                    <input type="submit" name="submit_expro" value="批量发货" class="btn btn-primary col-lg-1"  />
                    
                    <input type="submit" name="submit_modal" value="导出模板" class="btn btn-primary col-lg-1" style="margin-left:10px;" />
                    
                    </div>
            </form>
            {/if}
    </div>

</div>
<script language='javascript'>
$(function (){
    $("#ordertype").change(function () {
        var ordertype=$(this).val();
        window.location.href="{php echo $this->createWebUrl('allorder', array('op' => 'display'))}&p="+ordertype;
    });
});
</script>